package com.sh.代理模式.静态代理;


class MusicPlayerProxy implements MusicPlayer {
    private RealMusicPlayer realMusicPlayer;

    public MusicPlayerProxy() {
        realMusicPlayer = new RealMusicPlayer();
    }

    @Override
    public void play() {
        System.out.println("Before playing music.");
        realMusicPlayer.play();
        System.out.println("After playing music.");
    }
}